#pragma once

#include "GfxConfiguration.h"

#include "IApplication.hpp"

namespace My 
{
    // 用来提供各平台共通的Application实现
    class BaseApplication : implements IApplication
    {
    public:
        BaseApplication(GfxConfiguration& cfg);

    public:
        virtual int Initialize() override;
        virtual void Finalize() override;
        virtual void Tick() override;
        virtual bool IsQuit() override;

    public:
        inline virtual GfxConfiguration& GetConfiguration() override
        { return m_Config; } ;

    protected:
        static bool         m_bQuit;    // 退出APP主循环的标记
        GfxConfiguration    m_Config;   // 图形渲染的一些基本配置

    private:
        // 隐藏掉默认构造函数来强制执行需传入配置的构造函数
        BaseApplication() {};
    };
}
